<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
    <title>Bootstrap 栅格系统示例</title>
    <style>
        .row > div {
            background-color: #f8f9fa;
            border: 1px solid #dee2e6;
            padding: 15px;
        }
    </style>
</head>
<body>
    <div class="container py-4">
        <h2 class="mb-4">基础栅格系统</h2>

        <!-- 等宽列 -->
        <div class="row mb-4">
            <div class="col">等宽列</div>
            <div class="col">等宽列</div>
            <div class="col">等宽列</div>
        </div>

        <!-- 响应式栅格 -->
        <div class="row mb-4">
            <div class="col-12 col-md-8">.col-12 .col-md-8</div>
            <div class="col-6 col-md-4">.col-6 .col-md-4</div>
        </div>

        <!-- 混合布局 -->
        <div class="row mb-4">
            <div class="col-md-4">.col-md-4</div>
            <div class="col-md-4 offset-md-4">.col-md-4 .offset-md-4</div>
        </div>

        <!-- 嵌套栅格 -->
        <div class="row mb-4">
            <div class="col-sm-9">
                Level 1
                <div class="row">
                    <div class="col-8 col-sm-6">Level 2</div>
                    <div class="col-4 col-sm-6">Level 2</div>
                </div>
            </div>
        </div>

        <!-- 垂直对齐 -->
        <div class="row align-items-start mb-4" style="height: 100px;">
            <div class="col">顶部对齐</div>
        </div>

        <!-- 排序 -->
        <div class="row mb-4">
            <div class="col order-last">第一列（最后显示）</div>
            <div class="col">第二列（无排序）</div>
        </div>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
</body>
</html>
